package com.iursp;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.iursp.properties.SecurityConstants;

@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //registry.addViewController("/").setViewName("login");
        registry.addViewController("/login").setViewName("login");
        registry.addViewController("/loginOut").setViewName("loginOut");
        
        registry.addViewController("/index").setViewName("index");
        registry.addViewController(SecurityConstants.DEFAULT_SIGN_IN_PROCESSING_URL_FORM).setViewName("index");
        
        
        //registry.addViewController("/Jump/users").setViewName("user/index");
        //registry.addViewController("/Jump/authRole").setViewName("auth/role");
        //registry.addViewController("/Jump/databaseMonitor").setViewName("monitor/database");
        //registry.addViewController("/Jump/serverMonitor").setViewName("monitor/server");
        
        registry.addViewController(SecurityConstants.DEFAULT_SIGN_IN_MOBILE).setViewName("mobileLoginPage");
        
        registry.addViewController("/task/file/upload").setViewName("auth/fileUpload");
    }

}